<?php

namespace app\admin\controller;

use app\admin\BaseController;
use app\admin\model\BaseModel;

class Intro extends BaseController
{
    public function query()
    {
        $baseModel = BaseModel::where('village_id',$this->villageId)->find();
        return show($baseModel);
    }

    public function edit()
    {
        $params = $this->request->param();
        $baseModel = BaseModel::where('village_id',$this->villageId)->find();
        $baseModel->hs = $params['hs'];
        $baseModel->gdmj = $params['gdmj'];
        $baseModel->cmxzs = $params['cmxzs'];
        $baseModel->tdlzl = $params['tdlzl'];
        $baseModel->details = $params['details'];
        $baseModel->save();
        return show();
    }

}